home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 59426 / 59426.xpi / chrome / content / overlay.js < prev   
Text File  |  2009-11-08  |  766b  |  22 lines

  1. var bookerfox = {
  2.   onLoad: function() {
  3.     // initialization code
  4.     this.initialized = true;
  5.     this.strings = document.getElementById("bookerfox-strings");
  6.   },
  7.  
  8.   onMenuItemCommand: function(e) {
  9.     var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
  10.                                   .getService(Components.interfaces.nsIPromptService);
  11.     promptService.alert(window, this.strings.getString("helloMessageTitle"),
  12.                                 this.strings.getString("helloMessage"));
  13.   },
  14.  
  15.   onToolbarButtonCommand: function(e) {
  16.     // just reuse the function above.  you can change this, obviously!
  17.     bookerfox.onMenuItemCommand(e);
  18.   }
  19. };
  20.  
  21. window.addEventListener("load", bookerfox.onLoad, false);
  22.